package com.ydl.shopping.core.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
@Schema(name = "注册表单")
public class RegisterDTO {
    /** 用户名 */
    @NotBlank(message = "注册用户名不能为空")
    @Size(min = 3, message = "用户名长度不得小于3")
    @Schema(description = "用户名")
    private String username;

    /** 密码 */
    @NotBlank(message = "密码不能为空")
    @Size(min = 6, message = "密码长度不得小于6")
    @Schema(description = "密码")
    private String password;

    /** 角色标识 */
    @Schema(description = "角色标识")
    private String rolePerms;
}
